package com.java复习.demo1;

import java.util.ArrayList;
import java.util.List;

public class Demo2调用Cat_dog {
    public static void main(String[] args) {
        Cat cat1 = new Cat();
        cat1.name="小八嘎";
        cat1.age=2;
        cat1.color="黑白相间";
        cat1.eat();


        Cat cat2 = new Cat();
        cat2.name="花姑娘";
        cat2.age=3;
        cat2.color="黄";
        cat2.eat();

        Cat cat3 = new Cat();
        cat3.total = 2;


        System.out.println("****************************************");


        List list = new ArrayList();
        Dog dog1 = new Dog("小黑",3);
        Dog dog2 = new Dog(list);
        dog2.showlist();


    }
}
